import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/Login'
import main from '@/views/main'
import dept from '@/views/dept'
import role from '@/views/role'
import user from '@/views/user'
import fangwu from '@/views/zyh/home'
import jijia from '@/views/zyh/jijia'
import lc from '@/views/zyh/lc'
import ld from '@/views/zyh/ld'
import shangpu from '@/views/zyh/shangpu'
import xzl from '@/views/zyh/xzl'
import yezhu from '@/views/zyh/yezhu'
import zhuzhai from '@/views/zyh/zhuzhai'
import zuhu from '@/views/zyh/zuhu'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/Login',
    name: 'Login',
    component: Login
  },
  {
    path: '/main',
    name: 'Main',
    component: main,
    children: [

      {
        path: '/dept',
        name: 'dept',
        component: dept
      },
      {
        path: '/role',
        name: 'role',
        component: role
      },
      {
        path: '/user',
        name: 'user',
        component: user
      },
      {
        path: '/jijia',
        name: 'jijia',
        component: jijia
      },
      {
        path: '/fangwu',
        name: 'fangwu',
        component: fangwu
      },
      {
        path: '/ld',
        name: 'ld',
        component: ld
      },
      {
        path: '/lc',
        name: 'lc',
        component: lc
      },
      {
        path: '/shangpu',
        name: 'shangpu',
        component: shangpu
      },
      {
        path: '/xzl',
        name: 'xzl',
        component: xzl
      },
      {
        path: '/yezhu',
        name: 'yezhu',
        component: yezhu
      },
      {
        path: '/zhuzhai',
        name: 'zhuzhai',
        component: zhuzhai
      },
      {
        path: '/zuhu',
        name: 'zuhu',
        component: zuhu
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
